<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:a="http://richfaces.org/a4j">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>JBoss Suites: Seam Framework</title>
<link href="css/screen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<ui:composition template="/WEB-INF/template.xhtml">
	<ui:define name="topnav">
		<ui:include src="/include/admin_nav.xhtml" />
	</ui:define>
	<ui:define name="sidebar">
		<ui:include src="/include/left_nav.xhtml" />
	</ui:define>
	<ui:define name="body">
		<div class="body-title">Create New User</div>
		<h:form id="register">
			<fieldset><s:validateAll>

				<f:facet name="aroundInvalidField">
					<s:span styleClass="errors" />
				</f:facet>

				<div class="entry">
				<div class="label"><h:outputLabel for="username">Username:</h:outputLabel></div>
				<div class="input"><s:decorate id="usernameDecorate">
					<h:inputText id="username" value="#{user.username}" required="true">
						<a:support event="onblur" reRender="usernameErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="usernameErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

				<div class="entry">
				<div class="label"><h:outputLabel for="name">Real Name:</h:outputLabel></div>
				<div class="input"><s:decorate id="nameDecorate">
					<h:inputText id="name" value="#{user.name}" required="true">
						<a:support event="onblur" reRender="nameErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="nameErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

				<div class="entry">
				<div class="label"><h:outputLabel for="password">Password:</h:outputLabel></div>
				<div class="input"><s:decorate id="passwordDecorate">
					<h:inputSecret id="password" value="#{user.password}"
						required="true" />
					<br />
					<h:message for="password" />
				</s:decorate></div>
				</div>

				<div class="entry">
				<div class="label"><h:outputLabel for="verify">Verify Password:</h:outputLabel></div>
				<div class="input"><s:decorate id="verifyDecorate">
					<h:inputSecret id="verify" value="#{register.verify}"
						required="true" />
					<br />
					<h:message for="verify" />
				</s:decorate></div>
				</div>

			</s:validateAll>

			<div class="entry errors"><h:messages id="messages"
				globalOnly="true" /></div>

			<div class="entry">
			<div class="label">&#160;</div>
			<div class="input"><h:commandButton id="register"
				value="Register" action="#{register.register}" />&#160; <s:button
				id="cancel" value="Cancel" view="/admin/usermanager.xhtml" /></div>
			</div>

			</fieldset>
		</h:form>
	</ui:define>
</ui:composition>
</body>
</html>
